package com.youlu.campus.entity.vote;

import com.youlu.campus.base.base.EntityBase;
import lombok.Data;
import lombok.ToString;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.mapping.Document;

import java.time.LocalDate;

/**
 * @author : [dengbo]
 * @className : UserVotePointReceive
 * @description : [用户每天票数领取]
 * @createTime : [2022/7/6 16:48]
 */
@Data
@Document(collection = "user_vote_point_receive")
@CompoundIndexes({
        @CompoundIndex(name = "idx_aid_uid_date", def = "{'activityId':-1,'date':-1,'userId':-1}")
})
@ToString
public class UserVotePointReceive extends EntityBase {
    /**
     * 活动id
     */
    private String activityId;
    /**
     * appId
     */
    private String appId;
    /**
     * 用户ID
     */
    private String userId;
    /**
     * 日期
     */
    private LocalDate date;
    /**
     * 版本
     */
    private Integer version;
    /**
     * 领取数量
     */
    private Integer num;
    /**
     * 剩余数量
     */
    private Integer remainNum;
}
